All Questions
3 questions
4votes
3answers
1kviews
Python Enum Strategy Pattern
I have two behaviours: pulling or cloning a git repository. It started as an Enum, but then I had to switch over the enum all the time. I wanted to turn it into some kind of strategy pattern and ...
1vote
2answers
380views
on using the strategy pattern to switch between database layers
I'd like to build an app in Flask that can switch between talking to a PostGresql and a Mongo DB. As I understand it, the Strategy Pattern is about being able to switch algorithms that are referred ...
3votes
1answer
201views
refactor python strategy pattern to use abstract base class
I came across this strategy pattern implementation https://github.com/jtortorelli/head-first-design-patterns-python/blob/master/src/python/chapter_1/adventure_game.py ...